import 'package:zhongyao/http/manager.dart';

Future detail(String id) async {
  String url = "/zhongyao/detail?id=$id";
  try {
    var response = await HttpUtils.request(url, method: HttpUtils.GET);
    return response['data'];
  } catch (e) {
    print(e);
  }
}

Future search(String key) async {
  String url = "/zhongyao/search?key=$key";
  try {
    var response = await HttpUtils.request(url, method: HttpUtils.GET);
    return response['data'];
  } catch (e) {
    print(e);
  }
}

Future resou() async {
  String url = "/zhongyao/resou";
  try {
    var response = await HttpUtils.request(url, method: HttpUtils.GET);
    return response['data'];
  } catch (e) {
    print(e);
  }
}
